//app.js
App({

  globalData: {
    userInfo: null
  },

  onLaunch: function () {
    wx.login({
      success: function () {
        wx.getUserInfo({
          success: function (res) {
            var simpleUser = res.userInfo;
            console.log(simpleUser.nickName);
          }
        });
      }
    });
  }

})
